<?php
//封装这 拥有计算鸭子叫声的 即装饰着模式的鸭子
class CountDuckFactoryInterface implements DuckFactoryInterface {
    public function createRedDuck()
    {
        return new DuckDecker(new DuckRed());
    }
    public function createGreenDuck()
    {
        return new DuckDecker(new DuckGreen());
    }

    public function createE()
    {
        return new DuckDecker(new EAdapt(new E()));
    }
}